package com.siyuanren.gcocp.common.config;

import com.siyuanren.gcocp.common.util.ResourceUtils;

import java.io.Serializable;
import java.util.Map;

/**
 * Created by   guwr
 * Project_name education
 * Path         com.siyuanren.gcocp.common.config.PublicConfig
 * Date         2017/3/14
 * Time         19:28
 * Description
 */
public class PublicConfig implements Serializable {
    /**
     * 活动需要邀请的人数.
     */
    public static final int PUBLIC_ACTIVE_SUCCESS_FRIEND_COURT = 5;
    public static final int PUBLIC_QRCODE_GROUP_MAX_COUNT =  80;
    /**
     * 系统文件配置 加载。
     */
//    public static Map<String, String> PUBLIC_USER = ResourceUtils.getResourceBundle("public_user").getMap();
//    public static Map<String, String> PUBLIC_SYSTEM = ResourceUtils.getResourceBundle("public_system").getMap();
    private static Map<String, String> PUBLIC_INIT = ResourceUtils.getResourceBundle("init").getMap();

    /**
     * init 相关
     */
    public final static boolean IS_DEV_STATUS = Boolean.parseBoolean(PUBLIC_INIT.get("IS_DEV_STATUS"));
    public final static String TOMCAT_URL = PUBLIC_INIT.get("TOMCAT_URL");
    public final static String UPLOAD_HOST =  PUBLIC_INIT.get("RESOURCE_HOST");
    public final static String RESOURCE_URL =  PUBLIC_INIT.get("RESOURCE_HOST") + PUBLIC_INIT.get("RESOURCE_URL");
    public final static String USER_DATA_URL =  PUBLIC_INIT.get("RESOURCE_HOST") + PUBLIC_INIT.get("USER_DATA_URL");
    public final static String RESOURCE_PATH =  PUBLIC_INIT.get("RESOURCE_PATH");
    public final static String USER_DATA_PATH =  PUBLIC_INIT.get("USER_DATA_PATH");
    public final static String CLIENT_CONFIG_FILE = PUBLIC_INIT.get("CLIENT_CONFIG_FILE");
    public final static String ENV = PUBLIC_INIT.get("ENV");

    /**
     * 微信相关
     */
    private static Map<String, String> PUBLIC_WX = ResourceUtils.getResourceBundle("wx").getMap();
    public final static String PUBLIC_WX_APPID = PUBLIC_WX.get("appId");
    public final static String PUBLIC_WX_APPSECRET = PUBLIC_WX.get("appSecret");
    public final static String PUBLIC_WX_TOKEN = PUBLIC_WX.get("token");
    public final static String PUBLIC_WX_AESKEY = PUBLIC_WX.get("aesKey");
    public final static String PUBLIC_WX_URL = PUBLIC_WX.get("url");

    public final static String PUBLIC_WX_MCHID = PUBLIC_WX.get("mchId");
    public final static String PUBLIC_WX_MCHKEY = PUBLIC_WX.get("mchKey");
    public final static String PUBLIC_WX_SUBAPPID = PUBLIC_WX.get("subAppId");
    public final static String PUBLIC_WX_SUBMCHID = PUBLIC_WX.get("subMchId");
    public final static String PUBLIC_WX_KEYPATH = PUBLIC_WX.get("keyPath");
    public final static String PUBLIC_WX_NOTIFY_URL = PUBLIC_WX.get("notify_url");

    public final static String PUBLIC_WX_VOUCHER_URL = PUBLIC_WX.get("voucher_url");
    public final static String PUBLIC_WX_AUTHORIZE_URL = PUBLIC_WX.get("authorize_url");

    public final static String PUBLIC_WX_TEMPLATE_STUDY_REMIND = PUBLIC_WX.get("template_study_remind");
    public final static String PUBLIC_WX_TEMPLATE_SERVER_REMIND = PUBLIC_WX.get("template_server_remind");
    public final static String PUBLIC_WX_TEMPLATE_CERT_SEND = PUBLIC_WX.get("template_cert_send");
    public final static String PUBLIC_WX_TEMPLATE_SALE_SUCC = PUBLIC_WX.get("template_sale_succ");


    public static void main(String[] args) {
        System.out.println(IS_DEV_STATUS);
    }
}
